package com.xiaoshuidi.cloud.module.iot.service;

import com.xiaoshuidi.cloud.module.iot.controller.admin.doorlock.vo.DeviceGetDailyPowerResModel;
import com.xiaoshuidi.cloud.module.iot.controller.admin.doorlock.vo.OperateThirdDeviceRequestModel;
import com.xiaoshuidi.cloud.module.iot.controller.admin.doorlock.vo.OperateThirdDeviceResponseModel;
import com.xiaoshuidi.cloud.module.iot.controller.admin.doorlock.vo.PullThirdDeviceRequestModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.AccessTokenRequestModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.AccessTokenResponseModel;
import com.xiaoshuidi.cloud.module.iot.api.device.vo.AmmeterInfoResModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.pass.OperateThirdPassRequestModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.pass.OperateThirdPassResponseModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.pass.PassInfoResModel;
import com.xiaoshuidi.cloud.module.iot.api.device.vo.WaterMeterCommonResponseModel;
import com.xiaoshuidi.cloud.module.iot.dal.pojo.TbDeviceDo;

import java.util.List;

/**
 * @author Sky
 * create 2019/04/10
 * email sky.li@ixiaoshuidi.com
 * 第三方token业务
 **/
public interface ThirdInstanceService {
    /**
     * 查看品牌编码
     *
     * @return
     */
    String getBrand();

    /**
     * 获取access_token
     *
     * @return
     */
    AccessTokenResponseModel getAccessToken(AccessTokenRequestModel accessTokenRequestModel) throws Exception;

    /**
     * 拉取设备
     *
     * @param pullThirdDeviceRequestModel
     * @return
     */
    List<TbDeviceDo> getDevice(PullThirdDeviceRequestModel pullThirdDeviceRequestModel) throws Exception;

    /**
     * 第三方设备初始化操作
     *
     * @param thirdDeviceList
     * @return
     */
    List<TbDeviceDo> initializeDeviceInfo(List<TbDeviceDo> thirdDeviceList, PullThirdDeviceRequestModel pullThirdDeviceRequestModel);

    /**
     * 添加密码
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel addDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 获取动态密码
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel getDynamicDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 刷新电表信息
     *
     * @param tbDeviceDo
     * @param operateThirdDeviceRequestModel
     * @return
     */
    AmmeterInfoResModel refreshAmmeterInfo(TbDeviceDo tbDeviceDo, OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 水电表－日冻结数据查询
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    List<DeviceGetDailyPowerResModel> getDailyPower(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);


    /**
     * 修改密码（在线）
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel updateDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 冻结密码
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel frozenDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 解冻密码
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel unfrozenDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 电表合闸
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel switchAmmeterOn(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 电表跳闸
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel switchAmmeterOff(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 删除密码
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel deleteDoorLockPassword(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 刷新水表信息
     *
     * @param waterMeterCommonResponseModel
     * @param operateThirdDeviceRequestModel
     * @return
     */
    WaterMeterCommonResponseModel refreshWatermeterInfo(WaterMeterCommonResponseModel waterMeterCommonResponseModel, OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 门锁刷新
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel getDoorLockStatus(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 设置电表单价（单个设备）
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel setAmmeterPrice(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 设置电表付费模式（单个设备）
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel setAmmeterPayment(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 设置水表单价（单个设备）
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel setWaterMeterPrice(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 设置水表付费模式（单个设备）
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel setWaterMeterPayment(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 充值电表电费
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel chargeAmmeterFee(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 电表入住
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel stayAmmeter(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 电表退租
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel recedeAmmeter(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 获取门锁开门记录
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel getOpenLockRecordes(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 添加门禁人员
     *
     * @param operateThirdPassRequestModel
     * @return
     */
    OperateThirdPassResponseModel addPassMember(OperateThirdPassRequestModel operateThirdPassRequestModel);

    /**
     * 修改门禁人员
     *
     * @param operateThirdPassRequestModel
     * @return
     */
    OperateThirdPassResponseModel updatePassMember(OperateThirdPassRequestModel operateThirdPassRequestModel);

    /**
     * 删除门禁人员
     *
     * @param operateThirdPassRequestModel
     * @return
     */
    OperateThirdPassResponseModel deletePassMember(OperateThirdPassRequestModel operateThirdPassRequestModel);

    /**
     * 查询门禁人员组
     *
     * @param operateThirdPassRequestModel
     * @return
     */
    OperateThirdPassResponseModel getPassMemberGroups(OperateThirdPassRequestModel operateThirdPassRequestModel);

    /**
     * 刷新门禁详情
     *
     * @param tbDeviceDo
     * @param operateThirdPassRequestModel
     * @return
     */
    PassInfoResModel refreshPassInfo(TbDeviceDo tbDeviceDo, OperateThirdPassRequestModel operateThirdPassRequestModel);


    /**
     * 充值水表水费
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel chargeWatermeterFee(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 水表入住
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel stayWatermeter(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 水表退租
     *
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel recedeWatermeter(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel);

    /**
     * 远程开锁
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel remoteOpenDoorlock(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 冷水表关阀停水
     * @param operateThirdDeviceRequestModel
     * @return
     * @throws Exception
     */
    OperateThirdDeviceResponseModel switchColdWaterMeterOff(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 热水表关阀停水
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel switchHotWaterMeterOff(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 热水表开阀供水
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel switchHotWaterMeterOn(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;

    /**
     * 冷水表开阀供水
     * @param operateThirdDeviceRequestModel
     * @return
     */
    OperateThirdDeviceResponseModel switchColdWaterMeterOn(OperateThirdDeviceRequestModel operateThirdDeviceRequestModel) throws Exception;
}
